<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">

    <title>兽医查询界面</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="${pageContext.request.contextPath}/static/css/css.css" rel="stylesheet" type="text/css">

    <style type="text/css">
        #content {
            position: relative;
            top: 3px;
            width: 80%;
            height: 380px;
            margin: auto;
            overflow: hidden;
            z-index: 2;
        }

        .tab1 {
            position: relative;
            top: 120px;
            font-size: 24px;
        }

        #in1 {
            width: 250px;
            height: 30px;
            font-size: 24px;
        }

        #in3 {
            width: 250px;
            height: 30px;
            font-size: 24px;
        }

        #in2 {
            width: 80px;
            height: 28px;
        }
    </style>
    <script type="text/javascript">
        function checkId() {
            if (document.getElementById("in1").value == ""
                && document.getElementById("in3").value == "") {
                alert("请输入兽医名或专业！");
                return false;
            } else if (document.getElementById("in1").value != ""
                && document.getElementById("in3").value != "") {
                alert("仅支持单信息查询，双信息查询正在开发中...");
                return false;
            } else {
                return true;
            }
        }
    </script>
</head>
<body>
<!-- include top -->
<jsp:include page="${pageContext.request.contextPath}/top.jsp" flush="true"/>
<center>
    <div id="content">
        <c:if test="${msg!=null}">
            <span style="color: red">${msg}</span>
        </c:if>
        <form action="${pageContext.request.contextPath}/doc/DocSearch" method="post" onsubmit="return checkId()">
            <table border="0" cellpadding="0" cellspacing="2" class="tab1">
                <tr align="center">
                    <td>兽医姓名&nbsp;</td>
                    <td><input type="text" name="docName" id="in1"/></td>
                </tr>
                <tr align="center">
                    <td>兽医专业&nbsp;</td>
                    <td><input type="text" name="speName" id="in3"/></td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <input class="btn btn-default" type="submit" value="查询">
                        <input class="btn btn-default" type="reset" value="重置">
                        <a href="${pageContext.request.contextPath}/doc/toDocAdd">
                            <i><font color="gray" size="3" id="in2">添加</font></i>
                        </a>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</center>
<!-- include footer -->
<jsp:include page="${pageContext.request.contextPath}/footer.jsp" flush="true"/>
</body>
</html>
